<template>
  <div class="nav">
    <el-menu
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#20222a"
      text-color="#d8dadd"
      active-text-color="#fff"
      router
    >
      <el-menu-item index="/usermanages">
        <i class="el-icon-user-solid"></i>
        <span slot="title">人员管理</span>
      </el-menu-item>

      <el-menu-item index="/documentmanages">
        <i class="el-icon-menu"></i>
        <span slot="title">文件管理</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang='scss' scoped>
.nav {
  height: 100%;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 259px;
  min-height: 100%;
}
</style>